[#include "/includes/_layout.html"/]
<title>编辑微页面</title>
<link rel="stylesheet" href="${webctx}/resources/assets/css/weui.min.css">
<link rel="stylesheet" href="${webctx}/resources/assets/css/jquery-weui.css">
<link rel="stylesheet" href="${webctx}/resources/css/meditor.css">
<link rel="stylesheet" href="${webctx}/resources/css/productList.css">
<link rel="stylesheet" href="${webctx}/resources/css/product.css">
<script src="${webctx}/resources/assets/js/plugins/artTemplate/template.js"></script>
<script type="text/javascript" charset="utf-8" src="${webctx}/resources/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="${webctx}/resources/ueditor/ueditor.all.min.js"></script>
<script>
 var basePath='${webctx}';
</script>
[@layout]
<div class="wrapper wrapper-content">
	<div class="row animated fadeInLeft">
	
	[#include "/includes/menu-store.html" /]
	
<div class="col-sm-11">	
	<div class="row content-tabs">
		<nav class="page-tabs J_menuTabs">
	       <div class="page-tabs-content" style="margin-left: 0px;">
	           <a href="${webctx}/weipage" class="J_menuTab active">微页面</a>
		       <a href="${webctx}/weipage/cat" class="J_menuTab">分类</a>
	       </div>
	   	</nav>
	</div>
<input id="weipage_id" type="hidden" value="${weiPage.id}"></input>
<div class="main-container">
      
      <div style="padding:5px;background-color:#f5f5f5;">
		<a href="${webctx}/weipage">微页面</a> --编辑微页面--${weiPage.title}
	</div>
	<div style="padding-top:10px;">	
       <div id="action-box" class="action-box"> 
          <div class="arrow-right"></div> 
          <div class="action-bar-title">添加内容</div>
          <div class="action-bar">
               <ul>
                   <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="title">标题</a></li>
                    <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="goods-list">商品列表</a></li>
                    <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="goods">商品</a></li>
                    <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="search">商品搜索</a></li>
                    <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="richtext">富文本</a></li>
                    <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="activity">营销活动</a></li>
                    <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="text-href">文本导航</a></li>
                    <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="img-href">图片导航</a></li>
                     <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="ad">图片广告</a></li>
                    <li><a href="JavaScript:void(0)" class="add-field-btn" data-action="line">分隔线</a></li>
               </ul>
          </div>
       </div>

       <div id="mobile-box" class="mobile-box">
           <div class="mobile-status-bar">
           </div>
           
           <div class="mobile-design" id="mobile-design">       
          
           </div>
           
        		<div id="confirm-del-component" class="confirm-del-component">
		          <span>确定要删除吗？</span>
		          <button type="button" onclick="confirmDetete()">确定</button>
		          <button type="button" onclick="cancelDetete()">取消</button>
		       </div>       
       </div>
       
       
       <div id="prop-box" class="prop-box">
           <div class="arrow-left"></div> 
           <div id="prop-container" class="prop-container"> 
              
	            <div class="prop-panpel">
	            
	             <!-- ================================= -->
					<div id="title-panel" class="prop-panpel-hide">
					   <div class="p_row">
					            <label class="prop-label"><span class="red">*</span>标题：</label>
					            <div class="p_control">
					            	<input id="title-main" type="text"  maxlength="20" value=""  placeholder="请输入标题" name="herfText">  
					            </div> 
					    </div>
					    <div class="p_row">
					            <label class="prop-label">副标题：</label>
					            <input id="title-sub" type="text" maxlength="40" value="" name="herfText">   
					    </div>
					    
					     <div class="p_row">
					            <label class="prop-label">对齐：</label>
					            <label class="radio-label"><input  type="radio" value="left" name="title-align">居左</label>   
					            <label class="radio-label"><input  type="radio" value="center" name="title-align">居中</label>
					            <label class="radio-label"><input  type="radio" value="right" name="title-align">居右</label>
					    </div>
					    
					    <div class="p_row">
					           <label class="prop-label">字体颜色：</label>
					            <input id="title-color" type="color"> 
					            <button class="resetBlackColorBtn" data-ref-id="title-color"  type="button">重置</button>
					    </div>
					    
                         <div class="p_row">
					           <label class="prop-label">背景颜色：</label>
					            <input id="title-bgcolor" type="color"> 
					            <button class="resetWhiteBgColorBtn" data-ref-id="title-bgcolor"  type="button">重置</button>
					     </div>
					</div>
	       <!-- ================================= -->
	       		  <div id="richtext-panel" class="prop-panpel-hide">
					    <div class="p_row">
					        <label class="prop-label">背景颜色：</label>
					            <input id="richtext-bgcolor" type="color"  name="bgcolor">
					            <button  class="resetRichtextColorBtn" data-ref-id="richtext-bgcolor" type="button">重置</button>
					    </div>
					    <div class="p_row">
						    <div id="editor" class="edit-body edui-default" style="">
							    <script type="text/plain" id="editor"  name="title"></script>
							 </div>
						 </div>
					</div>
	           
	       <!-- ================================= -->
					<div id="search-panel" class="prop-panpel-hide">
					    <div class="p_row">
					        <label class="prop-label">背景颜色：</label>
					            <input id="search-bgcolor" type="color"  name="bgcolor">
					            <button  class="resetBgColorBtn" data-ref-id="search-bgcolor" type="button">重置</button>
					    </div>
					</div>
		   <!-- ================================= -->
		   <div id="line-panel" class="prop-panpel-hide">
					    <div class="p_row">
					        <label class="prop-label">背景颜色：</label>
					            <input id="line-bgcolor" type="color"  name="linecolor">
					            <button  class="resetLineColorBtn" data-ref-id="line-bgcolor" type="button">重置</button>
					    </div>
					    <div class="p_row">
					            <label class="prop-label"><span class="red">*</span>样式：</label>
					            <label class="radio-label"><input  type="radio" value="solid" name="lineType">实线 </label>   
					            <label class="radio-label"><input  type="radio" value="dashed" name="lineType">虚线</label>
					            <label class="radio-label"><input  type="radio" value="dotted" name="lineType">点线 </label>
					       </div>
		</div>
		    		     
	      <!-- ================================= -->      
					<div id="text-href-panel" class="prop-panpel-hide">
					    <div class="p_row">
					            <label class="prop-label"><span class="red">*</span>导航文字：</label>
					            <div class="p_control">
					                <input id="text-href-title"  type="text" maxLength="20"  value="" placeholder="请输入导航文字" name="herfText">  
					            </div> 
					    </div>
					    <div class="p_row">
					            <label class="prop-label"><span class="red">*</span>链接到：</label>
					            <select  id="text-href-link">
					                <option value=""></option>
					                <option value="1">商品分类</option>
					                <option value="2"> 营销活动</option>
					                <option value="3">会员主页</option>
					                <option value="9999">自定义外链</option>
					            </select>  
					    </div>
					    <div id="text-href-outurl-div" class="p_row">
					         <label class="prop-label"><span class="red">*</span>链接URL：</label> 
					         <input id="text-href-outurl" type="text" maxLength="200" placeholder="http://homepage.com.cn" value="" name="herfUrl">
					    </div>
					    
					    <div class="p_row">
					           <label class="prop-label">字体颜色：</label>
					            <input id="text-href-color" type="color"> 
					            <button class="resetHerfColorBtn" data-ref-id="text-href-color"  type="button">重置</button>
					    </div>
					    
                         <div class="p_row">
					           <label class="prop-label">背景颜色：</label>
					            <input id="text-href-bgcolor" type="color"> 
					            <button class="resetBgColorBtn" data-ref-id="text-href-bgcolor"  type="button">重置</button>
					    </div>
					</div>
					
					<!-- ================================== -->
					
					<div id="ad-panel" class="prop-panpel-hide">
					  <div class="p_row">
					            <label class="prop-label"><span class="red">*</span>显示方式：</label>
					            <label class="radio-label"><input  type="radio" value="1" name="show_method"/>折叠轮播 </label>   
					           <!--  <label class="radio-label"><input  type="radio" value="2" name="show_method"/>分开显示 </label> -->
					  </div>
					   <div class="hr-line-dashed"> </div>
					  <div class="p_row">
					            <label class="prop-label"><span class="red">*</span>显示大小：</label>
					            <label class="radio-label"><input  type="radio" value="1" name="size"/>大图</label>   
					  </div>
					  <div class="hr-line-dashed"> </div>
					  
					  <div class="p_row js-choices-region">
					    <ul class="choices ui-sortable" id="choices">
						</ul>
					  </div>
					  
					  <div class="control-group options">
							<a class="add-option js-add-img href="javascript:void(0);">
							<i class="prop-goods-icon-add"></i>
							添加一个广告
							</a>
					 </div>
					</div>
					 <!-- ================================= -->  
					 
					 
					<div id="goods-panel" class="prop-panpel-hide">
					       <div class="p_row">
					           <label class="prop-label"><span class="red">*</span>选择商品：</label>
				                  <ul id="prop-goods-list" class="prop-goods-list">
				                     <li id="prop-goods-add">
				                        <a href="javascript:void(0);" ><i class="prop-goods-icon-add"></i></a>
				                     </li>
				                     
				                  </ul>	
				                 			            
					       </div>
					       <div class="hr-line-dashed"> </div>
					       <div class="p_row">
					            <label class="prop-label"><span class="red">*</span>列表样式：</label>
					            <label class="radio-label"><input  type="radio" value="1" name="goods-list-style">大图</label>   
					            <label class="radio-label"><input  type="radio" value="2" name="goods-list-style">小图</label>
					            <label class="radio-label"><input  type="radio" value="3" name="goods-list-style">一大两小</label>
					            <label class="radio-label"><input  type="radio" value="4" name="goods-list-style">详细列表</label>
					       </div>
					        <div class="hr-line-dashed"> </div>
					       <div class="p_row">
					            <label class="radio-label"><input  type="radio" value="1" name="goods-item-style">卡片样式</label>   
					            <label class="radio-label"><input  type="radio" value="2" name="goods-item-style">简洁样式</label>
					       </div>
					        <div class="hr-line-dashed"> </div>
					        <div class="p_row">
					            <label class="radio-label"><input  type="checkbox" value="true" name="goods-show-buybtn">显示购买按钮</label>   
					       </div>
					       <div class="p_row">
					            <label class="radio-label"><input  type="checkbox" value="true" name="goods-show-name">显示商品名</label>   
					       </div>
					       <!-- <div class="p_row">
					            <label class="radio-label"><input  type="checkbox" value="true"  name="goods-show-introduction">显示商品简介</label>   
					       </div> -->
					       <div class="p_row">
					            <label class="radio-label"><input  type="checkbox" value="true"  name="goods-show-price">显示价格</label>   
					       </div>
					</div>
					
					<!-- 商品列表 -->
					
					<div id="goods-list-panel" class="prop-panpel-hide">
					       <div class="p_row" id="selectGroup">
					           <label class="prop-label">商品来源：</label>  
					           <a class="js-add-goods add-goods control-action" href="javascript:void(0);">从商品分组中选择</a> 			            
					       </div>
					        <div class="p_row" id="selectedGroup" style="display: none;">
					        <label class="prop-label">商品来源：</label>
					         <span class="label label-success" id="groupNameSelected"></span>
					         <a class="pull-right js-add-goods add-goods" href="javascript:void(0);">修改</a>
					       </div>
					       
					       <div class="p_row">
					                      <label>选择商品来源后，左侧实时预览暂不支持显示其包含的商品数据</label>
					       </div>
					       <div class="hr-line-dashed"> </div>
					       
					       <div class="p_row">
					           <label class="prop-label">显示个数：</label>  
					            <label class="radio-label"><input  type="radio" value="6" name="goods-list-size">6</label>   
					            <label class="radio-label"><input  type="radio" value="12" name="goods-list-size">12</label>
					            <label class="radio-label"><input  type="radio" value="18" name="goods-list-size">18</label> 			            
					       </div>
					       <div class="hr-line-dashed"> </div>
					       
					       <div class="p_row">
					            <label class="prop-label"><span class="red">*</span>列表样式：</label>
					            <label class="radio-label"><input  type="radio" value="1" name="goods-list-styles">大图</label>   
					            <label class="radio-label"><input  type="radio" value="2" name="goods-list-styles">小图</label>
					            <label class="radio-label"><input  type="radio" value="3" name="goods-list-styles">一大两小</label>
					            <label class="radio-label"><input  type="radio" value="4" name="goods-list-styles">详细列表</label>
					       </div>
					        <div class="hr-line-dashed"> </div>
					       <div class="p_row">
					            <label class="radio-label"><input  type="radio" value="1" name="goods-item-styles">卡片样式</label>   
					            <label class="radio-label"><input  type="radio" value="2" name="goods-item-styles">简洁样式</label>
					       </div>
					        <div class="hr-line-dashed"> </div>
					        <div class="p_row">
					            <label class="radio-label"><input  type="checkbox" value="true" name="goods-show-buybtn">显示购买按钮</label>   
					       </div>
					       <div class="p_row">
					            <label class="radio-label"><input  type="checkbox" value="true" name="goods-show-name">显示商品名</label>   
					       </div>
					       <div class="p_row">
					            <label class="radio-label"><input  type="checkbox" value="true"  name="goods-show-price">显示价格</label>   
					       </div>
					</div>
					
					<!-- 图片导航 -->
					
					<div id="img-href-panel" class="prop-panpel-hide">
					 
					  <div class="p_row js-choices-region">
					    <ul class="choices ui-sortable" id="choicesHref">
					   
					    </ul>
					  </div>
					   <div class="control-group options">
							<a class="add-option js-add-img" href="javascript:void(0);">
							<i class="prop-goods-icon-add"></i>
							添加图片（限4张）
							</a>
					 </div> 
					</div>
					
					<!-- 营销活动 -->
					<div id="activity-panel" class="prop-panpel-hide">
                     <div class="p_row" id="addActivity">
					            <label class="prop-label">营销活动：</label>
					            <div class="dropdown hover" style="float: right;margin-left: 20px;">
				                    <a class="dropdown-toggle" data-toggle="dropdown"><i class="prop-goods-icon-add"></i> 添加活动</a>
				                    <ul class="dropdown-menu">
				                       <!--  <li>
				                            <a class="js-add-seckill-activity add-activity">秒杀</a>
				                        </li> -->
				                        <li>
				                            <a class="js-add-limited-discount-activity add-activity">限时折扣</a>
				                        </li>
				                    </ul>
				                </div>
                      </div>
                      
                      <div class="p_row" id="Activitied">

					  </div>
					  
					 <div class="p_row" id="selectProduct" style="display: none;">
					              <label class="prop-label">已选商品：</label>
				                  <ul id="prop-dgoods-list" class="prop-goods-list">
				                     <li id="prop-dgoods-add">
				                        <a href="javascript:void(0);" ><i class="prop-goods-icon-add"></i></a>
				                     </li>
				                  </ul>	  			            
					 </div>
					</div>
                </div>
            </div> 
       </div>
       
       <div class="save-bar">
          <button type="button" class="btn  btn-success glyphicon glyphicon-floppy-disk"  onclick="savePage()">保存</button>
          &nbsp; &nbsp; <button type="button" class="btn btn-primary glyphicon glyphicon-search"  onclick="preview()">预览</button>
       </div>
      </div>
      
  </div>
</div>
</div>
</div>  
  
  <div class="modal fade" id="addGoodsModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:800px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">请勾选商品：</h4>
            </div>
            <div class="modal-body">
		           <div id="select-goods-div"  style="padding:5px;overflow:auto;">
						<table id="select-goods-Table" class="table table-striped table-bordered"  border="0">
							<thead>
								<tr>
									
									<th><span style="vertical-align: middle;">&nbsp;&nbsp;商品</span></th>
									<th>价格</th>
									<th>创建时间</th>
									<th>
										<input type="checkbox" id="productall" title="全选/反选" style="margin-right: 4px; vertical-align: middle;"/>
									</th>
									
								</tr>
							</thead>
							<tbody class="productLotGrid">
							</tbody>
						</table>
						<div  class="panel-body">
							<div id="productpager" class="jqpager" style="margin-bottom: 1px;float: right;"></div>
						</div>
				  </div>
            </div>
            <div class="modal-footer">
                
                <button type="button" id="selectedgoodsbtn" class="btn btn-primary">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
 </div>
 
   <div class="modal fade" id="addDiscountModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:800px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">请勾选限时打折活动：</h4>
            </div>
            <div class="modal-body">
		           <div id="select-discount-div"  style="padding:5px;overflow:auto;">
						<table id="select-discount-Table" class="table table-striped table-bordered"  border="0">
							<thead>
								<tr>
									<th><span style="vertical-align: middle;">&nbsp;&nbsp; 活动名称</span></th>
									<th>活动时间</th>
									<th>
										单选<!-- <input type="checkbox" id="discountall" title="全选/反选" style="margin-right: 4px; vertical-align: middle;"/> -->
									</th>
									
								</tr>
							</thead>
							<tbody class="discountLotGrid">
							</tbody>
						</table>
						<div  class="panel-body">
							<div id="discountpager" class="jqpager" style="margin-bottom: 1px;float: right;"></div>
						</div>
				  </div>
            </div>
            <div class="modal-footer">
                <button type="button" id="selectedDiscountbtn" class="btn btn-primary">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
 </div>
 
    <div class="modal fade" id="addDiscountModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:800px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">请勾选限时打折活动：</h4>
            </div>
            <div class="modal-body">
		           <div id="select-discount-div"  style="padding:5px;overflow:auto;">
						<table id="select-discount-Table" class="table table-striped table-bordered"  border="0">
							<thead>
								<tr>
									<th><span style="vertical-align: middle;">&nbsp;&nbsp; 活动名称</span></th>
									<th>活动时间</th>
									<th>
										单选<!-- <input type="checkbox" id="discountall" title="全选/反选" style="margin-right: 4px; vertical-align: middle;"/> -->
									</th>
									
								</tr>
							</thead>
							<tbody class="discountLotGrid">
							</tbody>
						</table>
						<div  class="panel-body">
							<div id="discountpager" class="jqpager" style="margin-bottom: 1px;float: right;"></div>
						</div>
				  </div>
            </div>
            <div class="modal-footer">
                <button type="button" id="selectedDiscountbtn" class="btn btn-primary">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
 </div>
 
    <div class="modal fade" id="addGroupModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:800px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">请选择分组：</h4>
            </div>
            <div class="modal-body">
		           <div id="select-group-div"  style="padding:5px;overflow:auto;">
						<table id="select-group-Table" class="table table-striped table-bordered"  border="0">
							<thead>
								<tr>
									<th><span style="vertical-align: middle;">&nbsp;&nbsp; 分组名称</span></th>
									<th>创建时间</th>
									<th>
										操作
									</th>
									
								</tr>
							</thead>
							<tbody class="groupLotGrid">
							</tbody>
						</table>
						<div  class="panel-body">
							<div id="grouppager" class="jqpager" style="margin-bottom: 1px;float: right;"></div>
						</div>
				  </div>
            </div>
        </div>
    </div>
 </div>
 <script type="text/template" id="group_table_tr_tpl">
		<tr>
			<td>
		    {group_name}
		    </td>
            <td>
		    {updated}
		    </td>
            <td>
            <button class="btn btn-default js-choose"  data-id="{id}" data-title="{group_name}">选取</button>
            </td>
		</tr>
</script>
 <script type="text/template" id="product_table_tr_tpl">
		<tr>
			<td>
			<ul class="js-picture-lists app-image-list"><li><img src="{img}"></li></ul>
            <p class="goods-title">{name}
			</p>
			</td>
			<td><span class="label label-success">￥{price}</span></td>
            <td><span>{startDate}</span></td>
             <td><input type="checkbox" class="productchk" data-id="{id}" style="margin-right: 4px; vertical-align: middle;"/></td>
		</tr>
</script> 
<script type="text/template" id="discount_table_tr_tpl">
		<tr class="package">
			<td>
				<span style="margin-right: 5px; margin-left: 2px; vertical-align: middle;">{promotionName}</span>
			</td>
			<td><span>{startDate}</span>至<span>{endDate}</span></td>
			<td>
				<input type="checkbox" class="discountchk" data-id="{promotionId}" data-name="{promotionName}" style="margin-right: 4px; vertical-align: middle;"/>
			</td>
		</tr>
</script> 
 
 
 
<!-- ================= -->
  <script id="tpl-title" type="text/html">
      <div style="min-height: 30px;">
      	  <div  style="background-color:{{bgColor}};color:{{color}};text-align:{{align}};">
			<h2 class="title" style="font-size: 18px;line-height: 22px;">{{if title}}{{title}} {{else}} 请输入标题文字 {{/if}}</h2>
			<div class="sub-title">{{subTitle}}</div>
          </div>
      </div>
  </script>
  <script id="tpl-search" type="text/html">
     <div class="weui-search-bar" style="background-color:{{bgColor}};">
		<form class="weui-search-bar__form">
			<div class="weui-search-bar__box">
		       <i class="weui-icon-search"></i>
		      <input type="search" class="weui-search-bar__input" placeholder="搜索">
		      <a href="javascript:void(0)" class="weui-icon-clear"></a>
		    </div>
			 <label class="weui-search-bar__label">
			   	  <i class="weui-icon-search"></i>
				  <span>搜索</span>
			 </label>
		 </form>
	</div>
  </script>
  
  <script id="tpl-text-href" type="text/html">
    <div  style="background-color:{{bgColor}};">
        <a href="javascript:void(0)" style="color:{{color}};">
            <div class="weui-cell">
			    <div class="weui-cell__bd">{{if title}}{{title}} {{else}} 请输入导航文字 {{/if}}</div>
			    <div class="weui-cell__ft">>>
			     </div>
		   </div>  
         </a>
   </div>
 </script> 
 
  <script id="tpl-line" type="text/html">
  <div class="custom-line-wrap" style="margin: 0;height:30px;">
   <div class="custom-line" style="height: 0px; border: none; border-top: 1px {{lineType}} {{lineColor}}"></div>
</div>
 </script> 
 
 <script id="tpl-goods-1" type="text/html">
<ul class="sc-goods-list clearfix size-0 card pic">
        <!-- 大图  -->
{{each showList as item i}}
                <li class="goods-card big-pic card ">
                    <a href="javascript: void(0);" class="link js-goods clearfix">
                        <div class="photo-block">
                            <img class="goods-photo js-goods-lazy" src="{{item.image}}">
                        </div>
                            <div class="info clearfix info-title info-price btn1">
                                    <p class="goods-title">{{item.name}}</p>
                                    <p class="goods-sub-title c-black hide"></p>
                                    <p class="goods-price"><em>{{item.price}}</em></p>
                                    <p class="goods-price-taobao"></p>
                            </div>
                            <div class="goods-buy btn1 "></div>
                    </a>
                </li>
 {{/each}}           
        <!-- 小图 -->
    </ul>
 </script> 
  <script id="tpl-goods-2" type="text/html">
   
   <ul class="sc-goods-list clearfix size-1 card pic">
        <!-- 小图  -->
 {{each showList as item i}}
                <li class="goods-card small-pic card">
                    <a href="javascript: void(0);" class="link js-goods clearfix">
                        <div class="photo-block">
                            <img class="goods-photo js-goods-lazy" src="{{item.image}}">
                        </div>
                            <div class="info clearfix info-no-title">
                                    <p class="goods-title">{{item.name}}</p>
                                    <p class="goods-price"><em>{{item.price}}</em></p>
                                    <p class="goods-price-taobao"></p>
                            </div>
                            <div class="goods-buy btn1">
                            </div>
                    </a>
                </li>
  {{/each}}
    </ul>

 </script>
  <script id="tpl-goods-3" type="text/html">

<ul class="sc-goods-list clearfix size-2 card pic">
        <!-- 大图  -->
        
            <!-- 一大两小 -->
                    <!-- 大图 -->
{{each showList as item i}}
{{if i < 1}}
                    <li class="goods-card big-pic card">
                        <a href="javascript: void(0);" class="link js-goods clearfix">
                            <div class="photo-block">
                                <img class="goods-photo js-goods-lazy" src="{{item.image}}">
                            </div>
                            
                                <div class="info clearfix info-no-title info-price">
                                        <p class="goods-title">{{item.name}}/p>
                                        <p class="goods-price"><em>{{item.price}}</em></p>
                                        <p class="goods-price-taobao"></p>
                                </div>
                                <div class="goods-buy btn1 "></div>
                        </a>
                    </li>
{{/if}}
{{if i > 0}}
<li class="goods-card small-pic card">
                        <a href="javascript: void(0);" class="link js-goods clearfix">
                            <div class="photo-block">
                                <img class="goods-photo js-goods-lazy" src="{{item.image}}">
                            </div>
                                <div class="info clearfix info-no-title">
                                        <p class="goods-title">{{item.name}}</p>
                                        <p class="goods-price"><em>{{item.price}}</em></p>
                                        <p class="goods-price-taobao"></p>
                                </div>
                                <div class="goods-buy btn1"></div>
                        </a>
                    </li>

{{/if}}
{{/each}}
                <!-- 小图 -->
            
    </ul>

 </script>
 
 <script id="tpl-goods-4" type="text/html">

    <ul class="sc-goods-list clearfix size-3 card list">
        <!-- 大图  -->
        
            <!-- 列表 -->
            {{each showList as item i}}
                <li class="goods-card card">
                    <a href="javascript: void(0);" class="link js-goods clearfix">
                       <div class="photo-block">
                           <img class="goods-photo js-goods-lazy" src="{{item.image}}">
                       </div>
                       <div class="info">
                            <p class="goods-title">{{item.name}}</p>
                            <p class="goods-price"><em>{{item.price}}</em></p>
                            <p class="goods-price-taobao"></p>
                                <div class="goods-buy btn1"></div>
                       </div>
                    </a>
                </li>
        {{/each}}
    </ul>

 </script>
 
 
<script id="tpl-ad" type="text/html">
 	<div class="swiper-container custom-swiper-wrap" data-space-between='10' data-pagination='.swiper-pagination' data-autoplay="1000">
		<div class="swiper-wrapper">				
{{if imgList.length}}
{{each imgList as item i}}
                <div class="swiper-slide">
                     <a href="{{if item.href}}{{item.href}}{{else}}javascript: void(0);{{/if}}" style="height: 170px;">
                     <h3 class="title">{{item.title}}</h3>
                       <img src="{{item.imgPath}}" height="300px">
                      </a>
                </div>
{{/each}}
{{else}}
<img src="https://img.yzcdn.cn/public_files/2015/10/28/aae1f435dfb5c908c9e86e0e52bc524c.jpg" style="max-height: 80px; display: block;">
{{/if}}
		</div>
		<div class="swiper-pagination"></div>
	</div>
 </script>
<script id="tpl-ad-panel" type="text/html">
                            <li class="choice">
							<div class="choice-image">
							<img class="thumb-image" src="{imgPath}" data-full-size="{imgPath}" width="118" height="118">
                            <a class="modify-image js-trigger-image" data-id="{id}" href="javascript: void(0);">重新上传</a>
							</div>
							<div class="choice-content">
								<div class="p_row">
								<label class="prop-label">标题：</label>
								<input class="form-control" id="ImgTitle" data-id="{id}" value="{title}" type="text" style="width: 130px;height: 30px;">
								</div>
								
								<div class="p_row">
					            <label class="prop-label"><span class="red">*</span>链接到：</label>
					            <select id="ad-href-url-{id}" class="form-control ad-href"  data-id="{id}"  style="width: 130px;height: 35px;">
					                <option value=""></option>
					                <option value="1">商品分类</option>
					                <option value="2"> 营销活动</option>
					                <option value="3">会员主页</option>
					                <option value="custom">自定义外链</option>
					            </select>  
					    </div>
					    <div id="text-href-outurl-{id}" class="p_row" style="display:none;">
					         <label class="prop-label"><span class="red">*</span>链接URL：</label> 
					         <input class="form-control herfUrl" data-id="{id}" type="text" maxLength="200" value="{outhref}" placeholder="http://homepage.com.cn" value="" name="herfUrl" style="width: 130px;height: 30px;">
					    </div>
						     </div>
						     <div class="actions">
								<span class="action add close-modal" title="添加">+</span>
								<span class="action deleteImg close-modal" data-id="{id}" title="删除">×</span>
								</div>
							</li>
</script>


<script id="tpl-img-href-panel" type="text/html">
 <ul class="custom-nav-4 clearfix">

{{each imgList as item i}}
<li>
<a href="javascript:;">
    <span class="nav-img-wap">
        <img src="{{item.imgPath}}">
    </span>
{{if item.title}}<span class="title">{{item.title}}</span>{{/if}}   
</a>
</li>
{{/each}}
</ul>
</script>

<script id="tpl-img-href-li-panel" type="text/html">
                            <li class="choice">
							<div class="choice-image">
							<img class="thumb-image" src="{imgPath}" data-full-size="{imgPath}" width="118" height="118">
                            <a class="modify-image js-trigger-image" data-id="{id}" href="javascript: void(0);">重新上传</a>
							</div>
							<div class="choice-content">
								<div class="p_row">
								<label class="prop-label">标题：</label>
								<input class="form-control" id="ImgHrefTitle" data-id="{id}" value="{title}" type="text" style="width: 130px;height: 30px;">
								</div>
								
								<div class="p_row">
					            <label class="prop-label"><span class="red">*</span>链接到：</label>
					            <select id="img-href-url-{id}" class="form-control img-href"  data-id="{id}"  style="width: 130px;height: 35px;">
					                <option value=""></option>
					                <option value="1">商品分类</option>
					                <option value="2"> 营销活动</option>
					                <option value="3">会员主页</option>
					                <option value="custom">自定义外链</option>
					            </select>  
					    </div>
					    <div id="img-href-outurl-{id}" class="p_row" style="display:none;">
					         <label class="prop-label"><span class="red">*</span>链接URL：</label> 
					         <input class="form-control imgHrefUrl" data-id="{id}" type="text" maxLength="200" value="{outhref}" placeholder="http://homepage.com.cn" value="" name="herfUrl" style="width: 130px;height: 30px;">
					    </div>
						     </div>
							</li>
</script>

<script id="tpl-activity-panel" type="text/html">
{{if showList.length}}
<div class="ump-limitdiscount"> 
 {{each showList as item i}}   
        <div class="ump-limitdiscount-good">
          <div class="good-time-info">
            <div class="good-image" style="background-image: url({{item.image}});"></div>
            <div class="good-image-mask">
              <div class="mask-icon"></div>
            </div>
            <div class="discount-countdown">
              <div class="ump-type-text">限时折扣</div>
              <div class="js-countdown clearfix">
                <span class="countdown-title">距离折扣结束还剩</span>
                <span class="countdown-time"><span class="countdown-number countdown-day">D</span><span class="countdown-colon">:</span><span class="countdown-number countdown-hour">H</span><span class="countdown-colon">:</span><span class="countdown-number countdown-minute">M</span><span class="countdown-colon">:</span><span class="countdown-number countdown-second">S</span></span>
              </div>
            </div>
          </div>
          <div class="good-detail clearfix">
            <div class="good-title overflow-to-ellipsis">
              <span class="discount-type">x折</span>
              <span class="title-text">{{item.name}}</span>
            </div>
            <div class="price">
              <span class="discount-price"><span class="yen">￥</span>xx.xx</span>
              <span class="original-price"><span class="yen">￥</span>xx.xx</span>
            </div>
            <div class="good-detail-right">
              <a class="js-btn-good-link" href="/admin/product/edit/{{item.id}}">立即查看</a>
              <div class="stock overflow-to-ellipsis" style="display: none;">剩余：xxx件</div>
            </div>
          </div>
        </div>
{{/each}} 
    </div>

{{else}}
<div style="padding: 10px; font-size: 16px;"> 点击编辑【营销活动模块】 </div>
{{/if}}

</script>

<script id="tpl-tag-list-panel" type="text/html">
<div class="custom-tag-list-menu-block js-collection-region" style="min-height: 323px;">
<ul class="custom-tag-list-side-menu">
<li class="current">
<a href="javascript:;"><span>商品组一</span></a>
</li>
</ul>
</div>

<div class="custom-tag-list-goods">
<ul class="custom-tag-list-goods-list">
<li class="custom-tag-list-single-goods clearfix">
                    <div class="custom-tag-list-goods-img">
                        <img src="https://img.yzcdn.cn/public_files/2015/10/28/69b0970572eb1ff21f919d265f4d1312.jpg?imageView2/2/w/120/h/120/q/75/format/jpg" style="display: inline;">
                    </div>
                    <div class="custom-tag-list-goods-detail">
                        <p class="custom-tag-list-goods-title">此处显示商品名称</p>
                        <span class="custom-tag-list-goods-price">￥100.00</span>
                        <a class="custom-tag-list-goods-buy" href="javascript:void(0)"><span></span></a>
                    </div>
                </li>
</ul>
</div>
</script>
<script src="${webctx}/resources/assets/js/jquery-weui.js"></script>
<script src="${webctx}/resources/js/weipage/meditor.js"></script>
<script type="text/javascript">

$(document).ready(function(){
	e.__init();
});
</script>
<script>
Template.init("#menu-shop");
Template.initSecond("#menu-weipage");
</script>